package com.example.demo.service;

import com.example.demo.mapper.UserMapper;
import com.example.demo.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ling
 * Date: 2023-02-14
 * Time: 11:54
 */
@Service
public class UserService {

    @Autowired
    UserMapper userMapper;

    public UserInfo getUserByName(String username) {
        return userMapper.getUserByName(username);
    }

    public int add(String username,String password) {
        return userMapper.add(username,password);
    }

    public UserInfo getMyInfoByUid(Integer uid) {
        return userMapper.getMyInfoByUid(uid);
    }
}
